using System;
using System.Collections.Generic;
using System.Text;

namespace Eve.Data
{
    public class Division : EveProperty
    {
        private string divisionName;
        private string description;
        private string leaderType;

        public string Name { get { return divisionName; } }
        public string Description { get { return description; } }
        public string Leader { get { return leaderType; } }

        internal Division(DbDataRow dr)
            : base(dr.Database, EvePropertyType.Division, dr["divisionID"])
        {
            Fill(dr);
        }
        internal Division(Database db, int id)
            : base(db, EvePropertyType.Division, id)
        {
            Fill(db.ExecuteSingle("SELECT * FROM crpNPCDivisions WHERE divisionID=" + id));
        }

        private void Fill(DbDataRow dr)
        {
            divisionName = dr["divisionName"];
            description = dr["description"];
            leaderType = dr["leaderType"];
        }
    }
}
